#ifndef OBJ_MAP_H
#define OBJ_MAP_H


#include <map>
#include <string>

using std::map;
using std::string;

class Obj;
class ObjMap
{
    public:
        ObjMap(const string& Name, Obj* pobj);
        ~ObjMap();

    public:
        static Obj *GetObj(const string& Name);
        static int PutObj(const string& Name, Obj*);
        static map<string, Obj*>& GetObjPools(); 

    private:
};

#define REGISTER_OBJ(Name,Type)\
    namespace{ Type tmpObj_##Type; ObjMap tmpMap_##Type((Name), &tmpObj_##Type); }

#endif
